package com.carhailing.coupons.parent;

import com.alipay.api.AlipayApiException;
import com.carhailing.common.config.AlipaySign;
import com.carhailing.common.domain.order.CarOrder;
import com.carhailing.common.domain.order.CarPayRecord;
import com.carhailing.common.exception.BusinessException;
import com.carhailing.coupons.aliPayVo.AlipayVo;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;

/**
 * @Author: Gd
 * @package: parent.child
 * @Project: Online_Taxi_Project
 * @Name: PayHandle
 * @Date: 2024-7-29 10:54
 */
public interface PayHandle {

    /**
     * 支付类型三方接口
     */
    String payCarOrder(AlipaySign alipaySign) throws BusinessException;
//    String payCarOrder(CarPayRecord carPayRecord);


    /**
     * 状态：支付中 0
     */
    void idStatusZero(CarPayRecord carPayRecord) throws Exception;

    /**
     * 主动查询订单接口
     */
    void queryTradeOrder(Long payRecordordernumber, String payRecordtype) throws Exception;

    /**
     * 支付宝回调
     */
    AlipayVo notifyInfos(HttpServletRequest request) throws BusinessException, AlipayApiException, UnsupportedEncodingException;

    /**
     * 退款
     */
    void refundCarOrder(Long orderNumber, CarOrder carOrder) throws BusinessException;
}
